import fs from 'fs';
import path from 'path';

// 读取文件内容
const filePath = path.join(process.cwd(), 'src/App.jsx');
const content = fs.readFileSync(filePath, 'utf8');

// 统计标签
const openDivCount = (content.match(/<div/g) || []).length;
const closeDivCount = (content.match(/<\/div>/g) || []).length;
const openContainerCount = (content.match(/<Container/g) || []).length;
const closeContainerCount = (content.match(/<\/Container>/g) || []).length;

console.log('标签统计：');
console.log(`Div标签: 打开=${openDivCount}, 关闭=${closeDivCount}, 差值=${openDivCount - closeDivCount}`);
console.log(`Container标签: 打开=${openContainerCount}, 关闭=${closeContainerCount}, 差值=${openContainerCount - closeContainerCount}`);